<?php

namespace JLPay\Models\Cashier;

use JLPay\Models\BaseRequest;

/**
 * 交易退款请求
 */
class TradeRefundRequest extends BaseRequest
{
    /**
     * API前缀
     */
    public const API_PREFIX = '/open/cashier/trans/trade';
    
    /**
     * API URI
     */
    public const API_URI = '/refund';

    protected ?string $merchNo = null;
    protected ?string $outTradeNo = null;
    protected ?string $oriOutTradeNo = null;
    protected ?string $totalAmount = null;
    protected ?string $remark = null;

    /**
     * 设置商户号
     *
     * @param string $merchNo
     * @return self
     */
    public function setMerchNo(string $merchNo): self
    {
        $this->merchNo = $merchNo;
        return $this;
    }

    /**
     * 设置外部交易号
     *
     * @param string $outTradeNo
     * @return self
     */
    public function setOutTradeNo(string $outTradeNo): self
    {
        $this->outTradeNo = $outTradeNo;
        return $this;
    }

    /**
     * 设置原外部交易号
     *
     * @param string $oriOutTradeNo
     * @return self
     */
    public function setOriOutTradeNo(string $oriOutTradeNo): self
    {
        $this->oriOutTradeNo = $oriOutTradeNo;
        return $this;
    }

    /**
     * 设置退款金额
     *
     * @param string $totalAmount
     * @return self
     */
    public function setTotalAmount(string $totalAmount): self
    {
        $this->totalAmount = $totalAmount;
        return $this;
    }

    /**
     * 设置备注信息
     *
     * @param string $remark
     * @return self
     */
    public function setRemark(string $remark): self
    {
        $this->remark = $remark;
        return $this;
    }

    /**
     * 获取商户号
     *
     * @return string|null
     */
    public function getMerchNo(): ?string
    {
        return $this->merchNo;
    }

    /**
     * 获取外部交易号
     *
     * @return string|null
     */
    public function getOutTradeNo(): ?string
    {
        return $this->outTradeNo;
    }

    /**
     * 获取原外部交易号
     *
     * @return string|null
     */
    public function getOriOutTradeNo(): ?string
    {
        return $this->oriOutTradeNo;
    }

    /**
     * 获取退款金额
     *
     * @return string|null
     */
    public function getTotalAmount(): ?string
    {
        return $this->totalAmount;
    }

    /**
     * 获取备注信息
     *
     * @return string|null
     */
    public function getRemark(): ?string
    {
        return $this->remark;
    }
} 